package cn.sdhuijin.vms.dao;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import cn.sdhuijin.vms.model.PersonRecord;

public interface IPersonRecordDao extends JpaRepository<PersonRecord, Long> {
	public Page<PersonRecord> findByOrganizationIdIn(Collection<Long> orgIds,
			Pageable pageable);

	public Page<PersonRecord> findByDateBetweenAndPersonNameLikeAndPersonOrganizationIdIn(
			Date startTime, Date endTime, String name, Collection<Long> orgIds,
			Pageable pageable);

	public List<PersonRecord> findByDateBetweenAndPersonNameLike(
			Date startTime, Date endTime, String name);

	public Page<PersonRecord> findByPersonOrganizationIdInAndDateBetweenAndPersonNameLike(
			Collection<Long> orgIds, Date startTime, Date endTime, String name,
			Pageable pageable);

	public List<PersonRecord> findByPersonOrganizationIdInAndDateBetweenAndPersonNameLike(
			Collection<Long> orgIds, Date startTime, Date endTime, String name);
}
